<style lang="sass" scoped>
	#app {
		position: relative;
		height: 100%;
		
		
	}
	/*.pageTransition-transition {
		opacity: 1;
		backface-visibility: hidden;
		-webkit-backface-visibility: hidden;
		transform: translateZ(0);
		-webkit-transform: translateZ(0);
		transform-style: preserve-3d;
		-webkit-transform-style: preserve-3d;
		-webkit-transition: all 0.4s;
		-webkit-transform-origin: 50% 0;
	}
	
	.pageTransition-enter {
		opacity: 0;
		transform: translateY(pxToRem(150px));
		-webkit-transform: translateY(pxToRem(150px));
	}
	
	.pageTransition-leave {
		opacity: 0;
		transform: translateY(pxToRem(-50px)) scale(0.9, 0.9);
		-webkit-transform: translateY(pxToRem(-50px)) scale(0.9, 0.9);
	}*/
</style>

<template>
	<div id="app">
		<router-view class="routeView" transition="pageTransition"></router-view>
		<!--<toplist></toplist>-->
	</div>
</template>

<script>
	console.log("frame loaded!");
//	var 	topList = require("../components/topList/topList.vue");
//	var getters = require('../libs/js/vuex/getters.js'),
//		actions = require('../libs/js/vuex/actions.js');
	module.exports = {
		method: {
			
		},
		ready(){
			
			var docEle = document.documentElement;
	       
	        var navigatorFlag = function() {
			    var userAgentInfo = navigator.userAgent;
			    //获取相关手机系统			   
			    var Agents = ["Android", "iPhone","SymbianOS", "Windows Phone","iPad", "iPod"];			                			                
			    var flag = true;
			    //如果当前没有匹配到的手机系统 那就是 PC端
			    for (var v = 0; v < Agents.length; v++) {
			        if (userAgentInfo.indexOf(Agents[v]) > 0) {
			            flag = false;
			             var fn = function() {
				            var width = docEle.clientWidth;
				            width && (docEle.style.fontSize = 10 * (width / 320) + "px");
				        };
	                    fn();
					    window.addEventListener('resize', fn, false);
					    document.addEventListener("DOMContentLoaded", fn, false);
			            break;
			        }
			    }	
			  	if(flag){			  		
			  		document.body.style.maxWidth = '720px';
			  	}
			    return flag;
			}
			navigatorFlag()
	
		}
//		components: {
//			"toplist": topList,
//		},
//		vuex: {
//			getters:getters
//		}
	}
</script>